package com.course.business.controller;


import com.course.server.domain.Test;
import com.course.server.service.TestService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


/*
* 如果返回的是json格式的数据,用@RestController
* 如果返回的是页面,使用@Controlle
* */

@RestController
public class TestController {

    @Resource
    private TestService testService;


    @RequestMapping("/test")
    public List<Test> test(){
        return testService.list();
    }
}
